package com.guchenbo.example.classloader;

public class Test4 {
    private static Test4 singleTon = new Test4();
	public static int count1;
	public static int count2 = 0;

    private Test4() {
        System.out.println("i");
        count1++;
		count2++;
	}

    public static Test4 getInstance() {
        return singleTon;
    }

    public static void main(String[] args) {
        Test4 singleTon = Test4.getInstance();
        System.out.println("count1=" + singleTon.count1);
        System.out.println("count2=" + singleTon.count2);
    }
}